<?php
namespace Common\Library\Exception;
/**
 * 客户端非法请求
 *
 * @property   $name Description
 * 
 * @author wangzhenxian
 * @package application.components 
 */
class BadRequest extends \Think\Exception
{
     public function __construct($message, $code = 0) {
        //parent::__construct("Bad Request: {$message}", 400 + $code);
        $result = array("ret" => 400 + $code,"msg" => "{$message}");
        
        header('Content-Type:application/json; charset=utf-8');
        exit(json_encode($result,0));
     }
}
